Integrand size = 19, antiderivative size = 163 \[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^3} \, dx=-\frac {b^3}{2 a^2 \left (a^2-b^2\right ) d (b+a \cos (c+d x))^2}+\frac {b^2 \left (3 a^2-b^2\right )}{a^2 \left (a^2-b^2\right )^2 d (b+a \cos (c+d x))}+\frac {\log (1-\cos (c+d x))}{2 (a+b)^3 d}-\frac {\log (1+\cos (c+d x))}{2 (a-b)^3 d}+\frac {b \left (3 a^2+b^2\right ) \log (b+a \cos (c+d x))}{\left (a^2-b^2\right )^3 d} \]
-1/2*b^3/a^2/(a^2-b^2)/d/(b+a*cos(d*x+c))^2+b^2*(3*a^2-b^2)/a^2/(a^2-b^2)^ 2/d/(b+a*cos(d*x+c))+1/2*ln(1-cos(d*x+c))/(a+b)^3/d-1/2*ln(1+cos(d*x+c))/( a-b)^3/d+b*(3*a^2+b^2)*ln(b+a*cos(d*x+c))/(a^2-b^2)^3/d
Time = 0.86 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.25 \[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^3} \, dx=\frac {(b+a \cos (c+d x)) \left (\frac {b^3}{a^2 \left (-a^2+b^2\right )}-\frac {2 b^2 \left (-3 a^2+b^2\right ) (b+a \cos (c+d x))}{a^2 (a-b)^2 (a+b)^2}+\frac {2 (b+a \cos (c+d x))^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{(-a+b)^3}+\frac {2 b \left (3 a^2+b^2\right ) (b+a \cos (c+d x))^2 \log (b+a \cos (c+d x))}{\left (a^2-b^2\right )^3}+\frac {2 (b+a \cos (c+d x))^2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{(a+b)^3}\right ) \sec ^3(c+d x)}{2 d (a+b \sec (c+d x))^3} \]
((b + a*Cos[c + d*x])*(b^3/(a^2*(-a^2 + b^2)) - (2*b^2*(-3*a^2 + b^2)*(b + a*Cos[c + d*x]))/(a^2*(a - b)^2*(a + b)^2) + (2*(b + a*Cos[c + d*x])^2*Lo g[Cos[(c + d*x)/2]])/(-a + b)^3 + (2*b*(3*a^2 + b^2)*(b + a*Cos[c + d*x])^ 2*Log[b + a*Cos[c + d*x]])/(a^2 - b^2)^3 + (2*(b + a*Cos[c + d*x])^2*Log[S in[(c + d*x)/2]])/(a + b)^3)*Sec[c + d*x]^3)/(2*d*(a + b*Sec[c + d*x])^3)
Time = 0.64 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.13, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.684, Rules used = {3042, 4360, 25, 25, 3042, 25, 3316, 25, 27, 603, 27, 2160, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\cos \left (c+d x-\frac {\pi }{2}\right ) \left (a-b \csc \left (c+d x-\frac {\pi }{2}\right )\right )^3}dx\) |
\(\Big \downarrow \) 4360 |
\(\displaystyle \int -\frac {\cos ^2(c+d x) \cot (c+d x)}{(-a \cos (c+d x)-b)^3}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int -\frac {\cos ^2(c+d x) \cot (c+d x)}{(b+a \cos (c+d x))^3}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \int \frac {\cos ^2(c+d x) \cot (c+d x)}{(a \cos (c+d x)+b)^3}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\sin \left (c+d x-\frac {\pi }{2}\right )^3}{\cos \left (c+d x-\frac {\pi }{2}\right ) \left (b-a \sin \left (c+d x-\frac {\pi }{2}\right )\right )^3}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\sin \left (\frac {1}{2} (2 c-\pi )+d x\right )^3}{\cos \left (\frac {1}{2} (2 c-\pi )+d x\right ) \left (b-a \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )\right )^3}dx\) |
\(\Big \downarrow \) 3316 |
\(\displaystyle \frac {a \int -\frac {\cos ^3(c+d x)}{(b+a \cos (c+d x))^3 \left (a^2-a^2 \cos ^2(c+d x)\right )}d(a \cos (c+d x))}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {a \int \frac {\cos ^3(c+d x)}{(b+a \cos (c+d x))^3 \left (a^2-a^2 \cos ^2(c+d x)\right )}d(a \cos (c+d x))}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {\int \frac {a^3 \cos ^3(c+d x)}{(b+a \cos (c+d x))^3 \left (a^2-a^2 \cos ^2(c+d x)\right )}d(a \cos (c+d x))}{a^2 d}\) |
\(\Big \downarrow \) 603 |
\(\displaystyle -\frac {\frac {b^3}{2 \left (a^2-b^2\right ) (a \cos (c+d x)+b)^2}-\frac {\int -\frac {2 \left (-b \cos (c+d x) a^3+b^2 a^2+\left (a^2-b^2\right ) \cos ^2(c+d x) a^2\right )}{(b+a \cos (c+d x))^2 \left (a^2-a^2 \cos ^2(c+d x)\right )}d(a \cos (c+d x))}{2 \left (a^2-b^2\right )}}{a^2 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {\frac {\int \frac {-b \cos (c+d x) a^3+b^2 a^2+\left (a^2-b^2\right ) \cos ^2(c+d x) a^2}{(b+a \cos (c+d x))^2 \left (a^2-a^2 \cos ^2(c+d x)\right )}d(a \cos (c+d x))}{a^2-b^2}+\frac {b^3}{2 \left (a^2-b^2\right ) (a \cos (c+d x)+b)^2}}{a^2 d}\) |
\(\Big \downarrow \) 2160 |
\(\displaystyle -\frac {\frac {\int \left (\frac {(a-b) a^2}{2 (a+b)^2 (a-a \cos (c+d x))}+\frac {(a+b) a^2}{2 (a-b)^2 (\cos (c+d x) a+a)}-\frac {b \left (3 a^2+b^2\right ) a^2}{\left (a^2-b^2\right )^2 (b+a \cos (c+d x))}+\frac {b^2 \left (b^2-3 a^2\right )}{\left (b^2-a^2\right ) (b+a \cos (c+d x))^2}\right )d(a \cos (c+d x))}{a^2-b^2}+\frac {b^3}{2 \left (a^2-b^2\right ) (a \cos (c+d x)+b)^2}}{a^2 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\frac {-\frac {b^2 \left (3 a^2-b^2\right )}{\left (a^2-b^2\right ) (a \cos (c+d x)+b)}-\frac {a^2 b \left (3 a^2+b^2\right ) \log (a \cos (c+d x)+b)}{\left (a^2-b^2\right )^2}-\frac {a^2 (a-b) \log (a-a \cos (c+d x))}{2 (a+b)^2}+\frac {a^2 (a+b) \log (a \cos (c+d x)+a)}{2 (a-b)^2}}{a^2-b^2}+\frac {b^3}{2 \left (a^2-b^2\right ) (a \cos (c+d x)+b)^2}}{a^2 d}\) |
-((b^3/(2*(a^2 - b^2)*(b + a*Cos[c + d*x])^2) + (-((b^2*(3*a^2 - b^2))/((a ^2 - b^2)*(b + a*Cos[c + d*x]))) - (a^2*(a - b)*Log[a - a*Cos[c + d*x]])/( 2*(a + b)^2) + (a^2*(a + b)*Log[a + a*Cos[c + d*x]])/(2*(a - b)^2) - (a^2* b*(3*a^2 + b^2)*Log[b + a*Cos[c + d*x]])/(a^2 - b^2)^2)/(a^2 - b^2))/(a^2* d))
3.3.25.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(x_)^(m_)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol ] :> With[{Qx = PolynomialQuotient[x^m, c + d*x, x], R = PolynomialRemainde r[x^m, c + d*x, x]}, Simp[d*R*(c + d*x)^(n + 1)*((a + b*x^2)^(p + 1)/((n + 1)*(b*c^2 + a*d^2))), x] + Simp[1/((n + 1)*(b*c^2 + a*d^2)) Int[(c + d*x) ^(n + 1)*(a + b*x^2)^p*ExpandToSum[(n + 1)*(b*c^2 + a*d^2)*Qx + b*c*R*(n + 1) - b*d*R*(n + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, d, p}, x] && IGt Q[m, 1] && LtQ[n, -1] && NeQ[b*c^2 + a*d^2, 0]
Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ .)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* f) Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) /2] && NeQ[a^2 - b^2, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Cos[e + f*x])^p*((b + a*Sin[e + f*x])^m/Si n[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]
Time = 1.07 (sec) , antiderivative size = 148, normalized size of antiderivative = 0.91
method | result | size |
derivativedivides | \(\frac {-\frac {b^{3}}{2 a^{2} \left (a +b \right ) \left (a -b \right ) \left (b +a \cos \left (d x +c \right )\right )^{2}}+\frac {b \left (3 a^{2}+b^{2}\right ) \ln \left (b +a \cos \left (d x +c \right )\right )}{\left (a +b \right )^{3} \left (a -b \right )^{3}}+\frac {b^{2} \left (3 a^{2}-b^{2}\right )}{\left (a +b \right )^{2} \left (a -b \right )^{2} a^{2} \left (b +a \cos \left (d x +c \right )\right )}-\frac {\ln \left (\cos \left (d x +c \right )+1\right )}{2 \left (a -b \right )^{3}}+\frac {\ln \left (\cos \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{3}}}{d}\) | \(148\) |
default | \(\frac {-\frac {b^{3}}{2 a^{2} \left (a +b \right ) \left (a -b \right ) \left (b +a \cos \left (d x +c \right )\right )^{2}}+\frac {b \left (3 a^{2}+b^{2}\right ) \ln \left (b +a \cos \left (d x +c \right )\right )}{\left (a +b \right )^{3} \left (a -b \right )^{3}}+\frac {b^{2} \left (3 a^{2}-b^{2}\right )}{\left (a +b \right )^{2} \left (a -b \right )^{2} a^{2} \left (b +a \cos \left (d x +c \right )\right )}-\frac {\ln \left (\cos \left (d x +c \right )+1\right )}{2 \left (a -b \right )^{3}}+\frac {\ln \left (\cos \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{3}}}{d}\) | \(148\) |
parallelrisch | \(\frac {3 \left (a^{2}+\frac {b^{2}}{3}\right ) \left (\cos \left (2 d x +2 c \right ) a^{2}+4 \cos \left (d x +c \right ) a b +a^{2}+2 b^{2}\right ) b \ln \left (-2 a +\sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (a -b \right )\right )+\left (a -b \right )^{3} \left (\cos \left (2 d x +2 c \right ) a^{2}+4 \cos \left (d x +c \right ) a b +a^{2}+2 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+6 \left (a +b \right ) \left (\frac {\left (a +\frac {b}{2}\right ) \left (a -\frac {b}{3}\right ) \cos \left (2 d x +2 c \right )}{2}+a \left (a +b \right ) \cos \left (d x +c \right )+\frac {a^{2}}{2}+\frac {11 a b}{12}+\frac {b^{2}}{12}\right ) b^{2}}{\left (a -b \right )^{3} \left (a +b \right )^{3} d \left (\cos \left (2 d x +2 c \right ) a^{2}+4 \cos \left (d x +c \right ) a b +a^{2}+2 b^{2}\right )}\) | \(223\) |
norman | \(\frac {\frac {6 a \,b^{2}}{d \left (a^{4}-2 a^{3} b +2 a \,b^{3}-b^{4}\right )}-\frac {2 \left (3 a \,b^{2}+b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{2}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {b \left (3 a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}\) | \(226\) |
risch | \(\frac {i x}{a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}}+\frac {i c}{d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {i x}{a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}}-\frac {i c}{d \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}-\frac {6 i b \,a^{2} x}{a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}-\frac {6 i b \,a^{2} c}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}-\frac {2 i b^{3} x}{a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}-\frac {2 i b^{3} c}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}-\frac {2 b^{2} \left (-3 a^{3} {\mathrm e}^{3 i \left (d x +c \right )}+a \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}-5 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}+b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-3 a^{3} {\mathrm e}^{i \left (d x +c \right )}+b^{2} a \,{\mathrm e}^{i \left (d x +c \right )}\right )}{a^{2} \left (-a^{2}+b^{2}\right )^{2} \left (a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{i \left (d x +c \right )}+a \right )^{2} d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {3 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right ) a^{2}}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}+\frac {b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}\) | \(591\) |
1/d*(-1/2/a^2*b^3/(a+b)/(a-b)/(b+a*cos(d*x+c))^2+b*(3*a^2+b^2)/(a+b)^3/(a- b)^3*ln(b+a*cos(d*x+c))+b^2*(3*a^2-b^2)/(a+b)^2/(a-b)^2/a^2/(b+a*cos(d*x+c ))-1/2/(a-b)^3*ln(cos(d*x+c)+1)+1/2/(a+b)^3*ln(cos(d*x+c)-1))
Leaf count of result is larger than twice the leaf count of optimal. 474 vs. \(2 (157) = 314\).
Time = 0.34 (sec) , antiderivative size = 474, normalized size of antiderivative = 2.91 \[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^3} \, dx=\frac {5 \, a^{4} b^{3} - 6 \, a^{2} b^{5} + b^{7} + 2 \, {\left (3 \, a^{5} b^{2} - 4 \, a^{3} b^{4} + a b^{6}\right )} \cos \left (d x + c\right ) + 2 \, {\left (3 \, a^{4} b^{3} + a^{2} b^{5} + {\left (3 \, a^{6} b + a^{4} b^{3}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (3 \, a^{5} b^{2} + a^{3} b^{4}\right )} \cos \left (d x + c\right )\right )} \log \left (a \cos \left (d x + c\right ) + b\right ) - {\left (a^{5} b^{2} + 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} + a^{2} b^{5} + {\left (a^{7} + 3 \, a^{6} b + 3 \, a^{5} b^{2} + a^{4} b^{3}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{6} b + 3 \, a^{5} b^{2} + 3 \, a^{4} b^{3} + a^{3} b^{4}\right )} \cos \left (d x + c\right )\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left (a^{5} b^{2} - 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} - a^{2} b^{5} + {\left (a^{7} - 3 \, a^{6} b + 3 \, a^{5} b^{2} - a^{4} b^{3}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{6} b - 3 \, a^{5} b^{2} + 3 \, a^{4} b^{3} - a^{3} b^{4}\right )} \cos \left (d x + c\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{2 \, {\left ({\left (a^{10} - 3 \, a^{8} b^{2} + 3 \, a^{6} b^{4} - a^{4} b^{6}\right )} d \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{9} b - 3 \, a^{7} b^{3} + 3 \, a^{5} b^{5} - a^{3} b^{7}\right )} d \cos \left (d x + c\right ) + {\left (a^{8} b^{2} - 3 \, a^{6} b^{4} + 3 \, a^{4} b^{6} - a^{2} b^{8}\right )} d\right )}} \]
1/2*(5*a^4*b^3 - 6*a^2*b^5 + b^7 + 2*(3*a^5*b^2 - 4*a^3*b^4 + a*b^6)*cos(d *x + c) + 2*(3*a^4*b^3 + a^2*b^5 + (3*a^6*b + a^4*b^3)*cos(d*x + c)^2 + 2* (3*a^5*b^2 + a^3*b^4)*cos(d*x + c))*log(a*cos(d*x + c) + b) - (a^5*b^2 + 3 *a^4*b^3 + 3*a^3*b^4 + a^2*b^5 + (a^7 + 3*a^6*b + 3*a^5*b^2 + a^4*b^3)*cos (d*x + c)^2 + 2*(a^6*b + 3*a^5*b^2 + 3*a^4*b^3 + a^3*b^4)*cos(d*x + c))*lo g(1/2*cos(d*x + c) + 1/2) + (a^5*b^2 - 3*a^4*b^3 + 3*a^3*b^4 - a^2*b^5 + ( a^7 - 3*a^6*b + 3*a^5*b^2 - a^4*b^3)*cos(d*x + c)^2 + 2*(a^6*b - 3*a^5*b^2 + 3*a^4*b^3 - a^3*b^4)*cos(d*x + c))*log(-1/2*cos(d*x + c) + 1/2))/((a^10 - 3*a^8*b^2 + 3*a^6*b^4 - a^4*b^6)*d*cos(d*x + c)^2 + 2*(a^9*b - 3*a^7*b^ 3 + 3*a^5*b^5 - a^3*b^7)*d*cos(d*x + c) + (a^8*b^2 - 3*a^6*b^4 + 3*a^4*b^6 - a^2*b^8)*d)
\[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^3} \, dx=\int \frac {\csc {\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{3}}\, dx \]
Time = 0.21 (sec) , antiderivative size = 241, normalized size of antiderivative = 1.48 \[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^3} \, dx=\frac {\frac {2 \, {\left (3 \, a^{2} b + b^{3}\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}} + \frac {5 \, a^{2} b^{3} - b^{5} + 2 \, {\left (3 \, a^{3} b^{2} - a b^{4}\right )} \cos \left (d x + c\right )}{a^{6} b^{2} - 2 \, a^{4} b^{4} + a^{2} b^{6} + {\left (a^{8} - 2 \, a^{6} b^{2} + a^{4} b^{4}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{7} b - 2 \, a^{5} b^{3} + a^{3} b^{5}\right )} \cos \left (d x + c\right )} - \frac {\log \left (\cos \left (d x + c\right ) + 1\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} + \frac {\log \left (\cos \left (d x + c\right ) - 1\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}}}{2 \, d} \]
1/2*(2*(3*a^2*b + b^3)*log(a*cos(d*x + c) + b)/(a^6 - 3*a^4*b^2 + 3*a^2*b^ 4 - b^6) + (5*a^2*b^3 - b^5 + 2*(3*a^3*b^2 - a*b^4)*cos(d*x + c))/(a^6*b^2 - 2*a^4*b^4 + a^2*b^6 + (a^8 - 2*a^6*b^2 + a^4*b^4)*cos(d*x + c)^2 + 2*(a ^7*b - 2*a^5*b^3 + a^3*b^5)*cos(d*x + c)) - log(cos(d*x + c) + 1)/(a^3 - 3 *a^2*b + 3*a*b^2 - b^3) + log(cos(d*x + c) - 1)/(a^3 + 3*a^2*b + 3*a*b^2 + b^3))/d
Leaf count of result is larger than twice the leaf count of optimal. 452 vs. \(2 (157) = 314\).
Time = 0.39 (sec) , antiderivative size = 452, normalized size of antiderivative = 2.77 \[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^3} \, dx=\frac {\frac {2 \, {\left (3 \, a^{2} b + b^{3}\right )} \log \left ({\left | -a - b - \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} \right |}\right )}{a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}} + \frac {\log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} - \frac {9 \, a^{3} b + 15 \, a^{2} b^{2} + 3 \, a b^{3} - 3 \, b^{4} + \frac {18 \, a^{3} b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {6 \, a^{2} b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {10 \, a b^{3} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {2 \, b^{4} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {9 \, a^{3} b {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {9 \, a^{2} b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, a b^{3} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {3 \, b^{4} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}{{\left (a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5}\right )} {\left (a + b + \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )}^{2}}}{2 \, d} \]
1/2*(2*(3*a^2*b + b^3)*log(abs(-a - b - a*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + b*(cos(d*x + c) - 1)/(cos(d*x + c) + 1)))/(a^6 - 3*a^4*b^2 + 3*a^2 *b^4 - b^6) + log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1))/(a^3 + 3*a ^2*b + 3*a*b^2 + b^3) - (9*a^3*b + 15*a^2*b^2 + 3*a*b^3 - 3*b^4 + 18*a^3*b *(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 6*a^2*b^2*(cos(d*x + c) - 1)/(cos (d*x + c) + 1) - 10*a*b^3*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 2*b^4*(c os(d*x + c) - 1)/(cos(d*x + c) + 1) + 9*a^3*b*(cos(d*x + c) - 1)^2/(cos(d* x + c) + 1)^2 - 9*a^2*b^2*(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2 + 3*a* b^3*(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2 - 3*b^4*(cos(d*x + c) - 1)^2 /(cos(d*x + c) + 1)^2)/((a^5 + a^4*b - 2*a^3*b^2 - 2*a^2*b^3 + a*b^4 + b^5 )*(a + b + a*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - b*(cos(d*x + c) - 1)/ (cos(d*x + c) + 1))^2))/d
Time = 14.16 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.12 \[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^3} \, dx=\frac {\ln \left (\cos \left (c+d\,x\right )-1\right )}{2\,d\,{\left (a+b\right )}^3}-\frac {\frac {\cos \left (c+d\,x\right )\,\left (b^4-3\,a^2\,b^2\right )}{a\,\left (a^4-2\,a^2\,b^2+b^4\right )}+\frac {b\,\left (b^4-5\,a^2\,b^2\right )}{2\,a^2\,\left (a^4-2\,a^2\,b^2+b^4\right )}}{d\,\left (a^2\,{\cos \left (c+d\,x\right )}^2+2\,a\,b\,\cos \left (c+d\,x\right )+b^2\right )}-\frac {\ln \left (\cos \left (c+d\,x\right )+1\right )}{2\,d\,{\left (a-b\right )}^3}-\frac {\ln \left (b+a\,\cos \left (c+d\,x\right )\right )\,\left (\frac {1}{2\,{\left (a+b\right )}^3}-\frac {1}{2\,{\left (a-b\right )}^3}\right )}{d} \]
log(cos(c + d*x) - 1)/(2*d*(a + b)^3) - ((cos(c + d*x)*(b^4 - 3*a^2*b^2))/ (a*(a^4 + b^4 - 2*a^2*b^2)) + (b*(b^4 - 5*a^2*b^2))/(2*a^2*(a^4 + b^4 - 2* a^2*b^2)))/(d*(b^2 + a^2*cos(c + d*x)^2 + 2*a*b*cos(c + d*x))) - log(cos(c + d*x) + 1)/(2*d*(a - b)^3) - (log(b + a*cos(c + d*x))*(1/(2*(a + b)^3) - 1/(2*(a - b)^3)))/d